<?php
namespace app\common\model;

use app\extra\ApiToken;
use app\extra\BaseModel;
use app\extra\DBCont;

class Partner extends BaseModel
{
    use \think\model\concern\SoftDelete;
    protected $deleteTime = 'delete_time';
    protected $auto = ['user_id'];
    public function setUserIdAttr()
    {
        return getUserID();
    }
    /**
     * 添加额外参数
     * @param $item
     */
    public function setAddedField(&$item){
        $item['user_desc'] = model('Admin')->getUserName($item['user_id']);
    }

}